package test00.test05.t05;

import java.util.function.Function;

/**
 * @Author lzp
 * @Date 2024-04-11
 */
public class test {
    public static void main(String[] args) {
        String sss = "张三,18";

        Function<String ,String> pla = (s) -> {
            String[] str = s.split(",");
            String name= str[0];
            int age = Integer.parseInt(str[1]);
            return String.valueOf(new Student(name,age));
        };

        System.out.println(pla.apply("zhang,18"));
        System.out.println(pla.apply(sss));

    }
}
